package com.tankbattle.stage.body;

public class GameOver implements Runnable {

    private int x;
    private int y;
    private int speed = 20;

    public GameOver(int x, int y) {
        this.x = x;
        this.y = y;
    }

    @Override
    public void run() {
        do {
            try {
                Thread.sleep(100);
            } catch (Exception e) {
                e.printStackTrace();
            }
            this.y -= speed;
        } while (y >= 260 - 21);

    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }


    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }


}
